:host(:not([hidden])) {
    display: inline-block;
}

.ui5-color-picker-root {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ui5-color-picker-main-color {
    width: 16rem;
    height: 16rem;
    position: relative;
    margin-bottom: var(--_ui5_color_picker_main_color_margin_bottom);
    border: 0.0625rem solid var(--sapContent_ForegroundBorderColor);
    background-size: 100%;
    background-image: -webkit-linear-gradient(left, #000, rgba(0,0,0,0)),-webkit-linear-gradient(top, rgba(255,255,255,0), #fff);
    background-image: -moz-linear-gradient(left, #000, rgba(0,0,0,0)),-moz-linear-gradient(top, rgba(255,255,255,0), #fff);
    background-image: linear-gradient(left, #000, rgba(0,0,0,0)),linear-gradient(top, rgba(255,255,255,0), #fff);
    background-image: -webkit-linear-gradient(left, #000, rgba(0,0,0,0), #fff),-webkit-linear-gradient(top, rgba(128,128,128,0), #808080);
    background-image: -moz-linear-gradient(left, #000, rgba(0,0,0,0), #fff),-moz-linear-gradient(top, rgba(128,128,128,0), #808080);
    background-image: linear-gradient(left, #000, rgba(0,0,0,0), #fff),linear-gradient(top, rgba(128,128,128,0), #808080);
	user-select: none;
    -moz-user-select: none;
}

.ui5-color-picker-circle {
    position: absolute;
    box-sizing: border-box;
    width: 0.8125rem;
    height: 0.8125rem;
    border: var(--_ui5_color_picker_circle_outer_border);
    border-radius: 0.6875rem;
    pointer-events: none;
}

.ui5-color-picker-circle:after {
    content: "";
    position: absolute;
    width: var(--_ui5_color_picker_circle_inner_circle_size);
    height: var(--_ui5_color_picker_circle_inner_circle_size);;
    border: var(--_ui5_color_picker_circle_inner_border);
    border-radius: 0.9375rem;
    pointer-events: none;
}

.ui5-color-picker-sliders-wrapper {
    width: calc(100% - 0.9375rem);
    margin-left: -0.9375rem;
    padding-bottom: 0.25rem;
}

[ui5-slider] {
    --_ui5_slider_active_progress_border: none;
    --_ui5_slider_progress_box_sizing: content-box;
    height: var(--_ui5_color_picker_sliders_height);
}

[ui5-slider]::part(handle) {
    width: var(--_ui5_color_picker_slider_handle_width);
    height: var(--_ui5_color_picker_slider_handle_height);
    background: transparent;
    box-sizing: border-box;
}

[ui5-slider]::part(handle-container) {
    margin-top: var(--_ui5_color_picker_slider_handle_container_margin_top);
    margin-inline-start: -0.125rem;
    z-index: 2;
}

[ui5-slider]::part(handle)::after {
    content: "";
    border: 0.125rem solid var(--_ui5_color_picker_slider_handle_inner_border_color);
    display: block;
    height: var(--_ui5_color_picker_slider_handle_after_height);
    border-radius: 1rem;
    width: 100%;
    box-sizing: border-box;
}

[ui5-slider]::part(root-container) {
	padding: var(--_ui5_color_picker_slider_spacing) 0;
}

[ui5-slider]::part(progress-container) {
    width: calc(100% + 0.6875rem);
    height: var(--_ui5_color_picker_slider_progress_container_height);
    position: absolute;
    margin-top: var(--_ui5_color_picker_slider_container_margin_top);
    border-radius: 0;
    border: 0.0625rem solid var(--sapField_BorderColor);
}

[ui5-slider].ui5-color-picker-hue-slider::part(progress-container) {
    background-size: 100%;
    background-image: -webkit-linear-gradient(left, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    background-image: -moz-linear-gradient(left, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    background-image: linear-gradient(left, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    background-color: none;
}

[ui5-slider].ui5-color-picker-alpha-slider::part(progress-container) {
    background-image: -webkit-linear-gradient(left, rgba(65, 120, 13, 0), var(--ui5_Color_Picker_Progress_Container_Color)), url('');
}

[ui5-slider]::part(progress-bar) {
    background: transparent;
}

.ui5-color-picker-current-color {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ui5-color-picker-colors-wrapper {
    display: flex;
    flex-wrap: nowrap;
    height: var(--_ui5_color_picker_colors_wrapper_height);
    border: 0.0625rem solid var(--sapField_BorderColor);
}

.ui5-color-picker-white,
.ui5-color-picker-color {
    width: 3.1rem;
    background: #fff;
    display: block;
}

.ui5-color-picker-color {
    background-image: url('');
}

.ui5-color-picker-color-inner {
    width: 100%;
    height: 100%;
}

.ui5-color-picker-hex-input-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.ui5-color-picker-hex-input {
    width: var(--_ui5_color_channel_hex_input_width);
    min-width: 4.5rem;
    margin-left: .2rem;
}

.ui5-color-channel-inputs-wrapper {
    display: flex;
    justify-content: space-around;
    width: 100%;
    align-items: center;
}

.ui5-color-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--_ui5-color_channel_margin_top);
    position: relative;
}

.ui5-color-channel-input {
    width: 2.5rem;
    min-width: 2.5rem;
    text-align: center;
}

.ui5-color-channel-input::part(input) {
    min-width: initial;
    padding: 0 0.25rem;
}

.ui5-color-channel-percentage-label {
    width: 1rem;
    margin-top: var(--_ui5_color_channel_toggle_button_margin-top);
}

.ui5-color-channel-toggle {
    min-width: var(--_ui5_color_channel_toggle_button_width);
    margin-inline-start: 0.5rem;
    margin-top: var(--_ui5_color_channel_toggle_button_margin-top);
}

.ui5-color-picker-hue-slider::part(progress-container)::before,
.ui5-color-picker-alpha-slider::part(progress-container)::before,
.ui5-color-picker-hue-slider::part(progress-container)::after,
.ui5-color-picker-alpha-slider::part(progress-container)::after,
[ui5-slider].ui5-color-picker-hue-slider::part(icon-slider),
[ui5-slider].ui5-color-picker-alpha-slider::part(icon-slider) {
     display: none;
}

.ui5-color-picker-alpha-slider::part(handle),
.ui5-color-picker-hue-slider::part(handle) {
    box-shadow: var(--_ui5_color_picker_slider_handle_box_shadow);
    border: var(--_ui5_color_picker_slider_handle_border);
}

.ui5-color-picker-alpha-slider::part(handle):hover,
.ui5-color-picker-hue-slider::part(handle):hover {
    border: var(--_ui5_color_picker_slider_handle_outline_hover);
}

.ui5-color-picker-alpha-slider::part(handle):focus,
.ui5-color-picker-hue-slider::part(handle):focus {
    outline: var(--_ui5_color_picker_slider_handle_outline_focus);
    outline-offset: 0.0625rem;
}

.ui5-color-picker-alpha-slider::part(handle):focus::before,
.ui5-color-picker-hue-slider::part(handle):focus::before {
    content: "";
    border: var(--_ui5_color_picker_slider_handle_inline_focus);
    display: block;
    height: var(--_ui5_color_picker_slider_handle_focus_height);
    border-radius: 1rem;
    box-sizing: border-box;
    top: -0.1875rem;
    position: absolute;
    bottom: 0.125rem;
    left: -0.1875rem;
    right: -0.1875rem;
}

.ui5-color-picker-alpha-slider::part(handle)::before,
.ui5-color-picker-hue-slider::part(handle)::before {
    display: none;
}

:dir(rtl) [ui5-slider].ui5-color-picker-hue-slider::part(progress-container) {
    background-image: -webkit-linear-gradient(right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    background-image: -moz-linear-gradient(right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    background-image: linear-gradient(right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}

:dir(rtl) .ui5-color-picker-sliders-wrapper {
	margin-left: 0.625rem;
}
